﻿//
// XN4SL - Xna Framework for Silverlight.
//
namespace Xn4Sl.Framework.Graphics
{
    /// <summary>
    /// Defines sprite sort-rendering options.
    /// </summary>
    public enum SpriteSortMode
    {
        /// <summary>
        /// SpriteBatch.Begin will apply new graphics device settings, and sprites will
        /// be drawn within each SpriteBatch.Draw call. In Immediate mode there can only
        /// be one active SpriteBatch instance without introducing conflicting device
        /// settings. Immediate mode is faster than Deferred mode.
        /// </summary>
        Immediate = 0,
        /// <summary>
        /// Sprites are not drawn until SpriteBatch.End is called. SpriteBatch.End will
        /// apply graphics device settings and draw all the sprites in one batch, in
        /// the same order calls to SpriteBatch.Draw were received. This mode allows
        /// SpriteBatch.Draw calls to two or more instances of SpriteBatch without introducing
        /// conflicting graphics device settings. SpriteBatch defaults to Deferred mode.
        /// </summary>
        Deferred = 1,
        /// <summary>
        /// Same as Deferred mode, except sprites are sorted by texture prior to drawing.
        /// This can improve performance when drawing non-overlapping sprites of uniform
        /// depth.
        /// </summary>
        Texture = 2,
        /// <summary>
        /// Same as Deferred mode, except sprites are sorted by depth in back-to-front
        /// order prior to drawing. This procedure is recommended when drawing transparent
        /// sprites of varying depths.
        /// </summary>
        BackToFront = 3,
        /// <summary>
        /// Same as Deferred mode, except sprites are sorted by depth in front-to-back
        /// order prior to drawing. This procedure is recommended when drawing opaque
        /// sprites of varying depths.
        /// </summary>
        FrontToBack = 4,
    }
}
